﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using WindowsFormsTest.Public;

namespace WindowsFormsTest.BusiManager
{
    public partial class ProviderManager : MainTabUserContorl
    {
        string[][] initData = new string[][] { new string[] { "华星光电", "HXGD", "A", "王五", "35339932", "陈晓", "", "中国", "hxgd@hxgd.com", "科技园", "" }, new string[] { "爱华电子", "aihua", "B", "陈爱华", "35339922", "陈晓博", "", "中国", "hxgd@aihua.com", "科技园", "" } };



        public ProviderManager()
        {
            InitializeComponent();

            this.dataGridView1.Rows.Add();
            for (int i = 0; i < initData.Length; i++)
            {
                for (int j = 0; j < initData[0].Length; j++)
                {
                    this.dataGridView1.Rows[i].Cells[j].Value = initData[i][j];
                }

            }
        }
        public override void SetModel(Public.WindowModel modelType)
        {
            switch (modelType)
            {
                case WindowModel.MANAGER_SEARCH:
                    {
                        this.splitContainer2.Panel1Collapsed = true;

                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }

        public void setModel(PanelModel modelType)
        {
            switch (modelType)
            {
                case PanelModel.ONLY_CONTROL:
                    {
                        this.splitContainer2.Panel1Collapsed = true;

                        break;
                    }
                default:
                    {
                        break;
                    }
            }
        }
        private void button10_Click(object sender, EventArgs e)
        {
            this.splitContainer1.Panel2Collapsed = false;
        }

        private void button9_Click(object sender, EventArgs e)
        {
            this.splitContainer1.Panel2Collapsed = true;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.splitContainer1.Panel2Collapsed = false;
        }

        private void splitContainer2_Panel1_Paint(object sender, PaintEventArgs e)
        {

        }
    }
}